package ui;

/*
 * View class planned to represent fog on towers.
 * Currently unused, since we could manage fog placement
 * in an easier way. Check towers to find out how.
 * */
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Toolkit;
/*Fader imports*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.event.*;
import java.awt.image.*;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

import td.FieldElement;
import td.Fog;

public class FogView extends FieldElementView{

	public FogView(Fog f){
		super(f);
		this.setLayout(new GridBagLayout());
		image = Toolkit.getDefaultToolkit().getImage("Images/fog.png");
		update();
	}
	
	@Override
	public void update() {
		this.removeAll();
		GridBagConstraints gridc = new GridBagConstraints();
		gridc.gridx = 0;
		gridc.gridy = 0;
		gridc.anchor = GridBagConstraints.CENTER;
		JLabel picLabel = new JLabel(new ImageIcon(image));
		picLabel.setOpaque(true);
		picLabel.setBackground(new Color(0,0,0,0));
		add(picLabel,gridc);
	}

}